package private1;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

public class XY {
    private static int counter=0;
    private int id;
    private int x=0;
    private int y=0;

    {//实例初始化器
        id=++counter;
    }
    public XY(){}
    public XY(int x){this.x=x;}
    public XY(int x,int y){this.x=x;this.y=y;}
    public String toString(){
        return "No."+id+"...("+x+","+y+")";
    }

    public static void main(String[] args) {
        XY a=new XY();
        XY b=new XY(10);
        XY c=new XY(20,3);
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);


    }

}
